package org.pps.gl.client.vue;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Bas de page
 * 
 */
public class Footer extends Composite {
	private VerticalPanel footer;

	public Footer() {
		footer = new VerticalPanel();
		footer.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		HorizontalPanel barre = new HorizontalPanel();
		footer.add(barre);
		barre.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		barre.setSize("550px", "50px");
		initWidget(footer);
		footer.setSize("100%", "100%");
		
		Label hprlnkNewHyperlink = new Label("Polytech +");
		hprlnkNewHyperlink.setStyleName("footerHyper");
		hprlnkNewHyperlink.setStylePrimaryName("footerHyper");
		barre.add(hprlnkNewHyperlink);
		hprlnkNewHyperlink.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				//FIXME faire revenir sur la page d'acceuil
			}
		});

		FTR_ModeEmploi me = new FTR_ModeEmploi();
		me.setStylePrimaryName("footerHyper");
		me.setStyleName("footerHyper");
		barre.add(me);

		// envoyer un mail à un administrateur
		FTR_NMessagesAdmin as = new FTR_NMessagesAdmin();
		as.setStylePrimaryName("footerHyper");
		as.setStyleName("footerHyper");
		barre.add(as);
		
		// objet composite qui est un label qui ouvre une boite de dialogue
		FTR_About ab = new FTR_About();
		ab.setStylePrimaryName("footerHyper");
		ab.setStyleName("footerHyper");
		barre.add(ab);
		barre.setSpacing(10);
		barre.setCellHorizontalAlignment(ab,
				HasHorizontalAlignment.ALIGN_RIGHT);
	}

}
